<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"  import="java.sql.*"%>
<%@ page import="java.util.*,java.text.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<link rel="stylesheet"  href="<%=request.getContextPath() %>/css/admin/resetcss.css"/>
<link rel="stylesheet"  href="<%=request.getContextPath() %>/css/admin/headercss.css"/>
<link rel="stylesheet"  href="<%=request.getContextPath() %>/assets/css/bootstrap.min.css"/>

<link rel="stylesheet" href="<%=request.getContextPath() %>/assets/css/bootstrap.min.css">
<script src="<%=request.getContextPath()%>/assets/js/jquery.min.js"></script>
<script src="<%=request.getContextPath()%>/assets/js/bootstrap.min.js"></script>

<script type="text/javascript" src="<%=request.getContextPath()%>/js/modifypassword.js"></script>
<!-- 自己写的js一定放下在jquery的下面，因为自己写的js依赖jquery -->




</head>
<body>


<%! String str="";
	int t;
	String gre="";
%>
<%
	SimpleDateFormat sdf=new SimpleDateFormat("HH");//这里用HH获取当前时间的小时，但是注意它是String类型的。"yyyy年MM月dd日 HH:mm:ss"
	java.util.Date d=new java.util.Date();//Date d=new Date();这样会报错  原因https://blog.csdn.net/lifelegendc/article/details/72764385
	str=sdf.format(d);
	try {
	     t = Integer.parseInt(str);
	} catch (NumberFormatException e) {
	    e.printStackTrace();
	}//上面把String类型的数据转化为Int型的数据 ，不捕获异常也不会报错
	if(t>=0&&t<=12){
		gre="上午好，";
	}else{
		gre="下午好，";
	}
	String username=(String)(session.getAttribute("admin_username"));
	if(username==null||username.equals("")){
		username=(String)(session.getAttribute("teachername"));
	}
	gre+=username;
%>
<div id="header">
		<div id="headernei">
			<ul>
				<li><font size="5px">上机考试系统</font></li>
				<li><a class="hd glyphicon glyphicon-home" href="<%=request.getContextPath() %>/jsp/admin/admin_index_page.jsp"> 首页</a></li>
				<li><a class="hd glyphicon glyphicon-user" href="<%=request.getContextPath() %>/allteacher.action"> 教师管理</a></li>
				<li><a class="hd glyphicon glyphicon-edit" href="<%=request.getContextPath() %>/allexam.action"> 考试清理</a></li>
				<li><a class="hd glyphicon glyphicon-wrench" href="<%=request.getContextPath() %>/jsp/admin/admin_manage_config.jsp"> 系统配置</a></li>
				<li>&nbsp;</li>
				<li>&nbsp;</li>
				<li><%=gre %></li>
				<li><a id="modifypassword" class="hd glyphicon glyphicon-pencil">修改口令</a></li>
				
				<li><a class="hd glyphicon glyphicon-remove-sign" href="<%=request.getContextPath() %>/adminexit.action"> 退出</a></li>
			</ul>
		</div>
	
</div>




<div >
			<img alt="管理员" src="<%=request.getContextPath() %>/assets/img/exam-admin.png">
			<font size="10px">系统管理</font>
</div>


<div class="modal fade " id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-dialog modal-sm" role="document"><!-- 就是这个标签的class加上了modal-sm，所以出来的提示框才是窄的 -->
            <div class="modal-content">
                <div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
					<h4 class="modal-title">修改口令</h4>
				</div>
				<div class="modal-body">
				<form class=" form exam-form" action="modifypassword.action" method="post">
					<p>
						<input class="input" type="password" name="oldpass" placeholder="原口令" style="width:100%"/>
						<br/>
						<input class="input" type="password" name="newpass1" placeholder="新口令" style="width:100%"/>
						<br/>
						<input class="input" type="password" name="newpass2" placeholder="重输新口令" style="width:100%"/>
						<br/>
						<input type="submit" class="btn btn-primary" value="修改" style="width:100%"/>
					</p>
				</form>
				</div>
			
            </div>
        </div>
       </div>



</body>
</html>